package com.demo.boot.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;



/**
 * @date 21-6-13 8:23
 * @author ccubee
 */
@Component
public class MyListener {
	private Logger logger = LoggerFactory.getLogger(getClass());


	/**
	 *注意此处
	 */
	@EventListener
	public void handleDemoEvent(MyEvent event) {
		logger.info("发布的data为:{}", event.getData());
	}
}